import request from '@/utils/request'

export function getBrands(query) {
  return request({
    url: '/brand/list',
    method: 'get',
    params: query
  })
}

export function createBrand(data) {
  return request({
    url: '/brand/create',
    method: 'post',
    data
  })
}

export function updateBrand(data) {
  return request({
    url: '/brand/update/' + data.id,
    method: 'post',
    data
  })
}

export function deleteBrand(id) {
  return request({
    url: '/brand/delete/' + id,
    method: 'get'
  })
}
